using QFramework;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class NetworkController : MonoBehaviour, IController
{
    public ServerType ServerType;
    // Start is called before the first frame update
    void Awake()
    {
        this.RegisterEvent<InitNetworkEvent>(OnInitNetwork).UnRegisterWhenGameObjectDestroyed(this);
    }

    private void OnInitNetwork(InitNetworkEvent e)
    {
        this.GetSystem<INetworkSystem>().ServerType = ServerType;
        this.GetSystem<INetworkSystem>().HttpBaseUrl = RequestUrl.GetServerBaseUrl(ServerType);
    }

    public IArchitecture GetArchitecture()
    {
        return DigitalTwin_GeLinMei_2.Interface;
    }

}
